# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=perl-text-query
_cpanname=Text-Query
pkgver=0.09
pkgrel=4
pkgdesc="Query processing framework"
arch=('any')
url="https://search.cpan.org/~EBOHLMAN/${_cpanname}"
license=('GPL' 'PerlArtistic')
depends=('perl')
options=('!emptydirs')
source=(https://search.cpan.org/CPAN/authors/id/J/JO/JONJ/Text-Query-$pkgver.tar.gz)
md5sums=('d342fa12d0ba12631bda2bc25d5dfea1')

build() {
  cd "${srcdir}"/${_cpanname}-${pkgver}
  sed -i '/^auto_install/d' Makefile.PL
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd "${srcdir}"/${_cpanname}-${pkgver}
  make install DESTDIR="${pkgdir}"
  find "${pkgdir}" -name '.packlist' -delete
  find "${pkgdir}" -name '*.pod' -delete
}
